package com.mywork.activity;

import android.content.Intent;
import android.view.View;
import android.widget.RelativeLayout;

import com.ciko.code.base.BaseActicity;
import com.multi_image_selector.MultiImageSelectorActivity;
import com.mywork.R;

/**
 * Created by HP on 2016/2/17.
 */
public class SubmitPollActivity extends BaseActicity {
    private RelativeLayout rlSubmitPhone;
    private int PIC_MAX_LENGTH = 6;
    @Override
    protected void initTopBar() {
        setTitle("发布投票");
        enableNavLeftImg();
    }

    @Override
    protected void initLayout() {
        setContentView(R.layout.activity_submit_poll);
    }

    @Override
    protected void initView() {
        rlSubmitPhone = (RelativeLayout) findViewById(R.id.rl_submit_phone);
    }

    @Override
    protected void initAdapter() {

    }

    @Override
    protected void initDates() {

    }

    @Override
    protected void initListener() {
        rlSubmitPhone.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        if(v == rlSubmitPhone)
        {
            Intent intent = new Intent(this, MultiImageSelectorActivity.class);
            // 是否显示拍摄图片
            intent.putExtra(MultiImageSelectorActivity.EXTRA_SHOW_CAMERA, true);
            // 最大可选择图片数量
            intent.putExtra(MultiImageSelectorActivity.EXTRA_SELECT_COUNT, PIC_MAX_LENGTH);
            // 选择模式
            intent.putExtra(MultiImageSelectorActivity.EXTRA_SELECT_MODE, MultiImageSelectorActivity.MODE_MULTI);
            // 默认选择
//            if (selectedPictureAll != null && selectedPictureAll.size() > 0)
//            {
//                intent.putExtra(MultiImageSelectorActivity.EXTRA_DEFAULT_SELECTED_LIST, selectedPictureAll);
//            }
//            bActivity.startActivityForResult(intent, REQUEST_IMAGE);
            startActivity(intent);
        }
    }
}
